﻿
//Author: 张亚涛
//createtime:2015-12-26 22:37:41
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{

    /// <summary>
    /// 该类提供了一系列操作 "UaerCom" 表的方法;
    /// </summary>
    public class UaerComService
    {
        #region .对本表的维护.
        #region select data
        /// <summary>
        /// 返回UaerCom表的所有数据  
        /// </summary>
        /// <param name="UserID">员工ID</param>
        /// <returns></returns>        
        public static List<UaerCom> GetAllUaerCom(long UserID)
        {
            return UaerComBase.GetAllUaerCom(UserID);
        }
         /// <summary>
        /// 根据小区ID返回数据列表
        /// </summary>
        /// <param name="CommuntyID">小区ID</param>
        /// <returns></returns>        
        public static List<UaerCom> GeListByCommuntyID(long CommuntyID)
        {
            return UaerComBase.GeListByCommuntyID(CommuntyID);
        }
        /// <summary>
        /// 返回空闲员工数量
        /// </summary>
        /// <returns></returns>        
        public static int GetUserCount()
        {
            return UaerComBase.GetUserCount();
        }
        /// <summary>
        /// 根据UaerCom表的ID字段返回数据  
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>        
        public static UaerCom GetUaerComById(int id)
        {
            return UaerComBase.GetUaerComById(id);
        }
        #endregion
        #region delete data
        /// <summary>
        /// 根据UaerCom表的ID字段删除数据 
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>返回受影响的行数</returns>
        public static int DeleteUaerComById(int id)
        {
            return UaerComBase.DeleteUaerComById(id);
        }
        #endregion
        #region update data
        /// <summary>
        /// 根据UaerCom表的ID字段更新数据 
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="UaerCom">uaerCom</param>
        /// <returns>返回受影响的行数</returns>
        public static int UpdateUaerComById(UaerCom uaerCom)
        {
            return UaerComBase.UpdateUaerComById(uaerCom);
        }
        #endregion
        #region insert data
        /// <summary>
        /// 向UaerCom表插入一条数据，插入成功则返回自增列数值，插入不成功则返回-1 
        /// </summary>
        /// <param name="uaerCom">UaerCom</param>        
        /// <returns></returns>
        public static int AddUaerCom(UaerCom uaerCom)
        {
            return UaerComBase.AddUaerCom(uaerCom);
        }
        #endregion
        #endregion

        #region .SQL语句汇总.
        /// <summary>
        /// 返回UaerCom表的所有数据（SQL语句） 
        /// </summary>
        /// <returns></returns>        
        public static string GetAllUaerCom_SQL()
        {
            return UaerComBase.GetAllUaerCom_SQL();
        }
        #endregion
    }
}